Nesting forward-mode AD in a functional framework
نویسندگان
چکیده
We discuss the implications of the desire to augment a functionalprogramming language with a derivative-taking operator using forward-mode automatic differentiation (AD). The primary technical difficulty in doing so lies in ensuring correctness in the face of nested invocation of that operator, due to the need to distinguish perturbations introduced by distinct invocations. We exhibit a series of implementations of a referentially-transparent forward-mode AD derivative-taking operator, each of which uses a different non-referentially-transparent mechanism to distinguish perturbations. Even though the forward-mode AD derivative-taking operator is itself referentially transparent, we hypothesize that one cannot correctly formulate this operator as a function definition in current pure dialects of Haskell.
منابع مشابه
A Lean Manufacturing Roadmap for an Automotive Body Assembly Line within Axiomatic Design Framework
In this paper we are to present a practical application of Axiomatic Design (AD) methodology, as a roadmap to lean production, in redesigning a car body assembly line. Axiomatic Design theory provides a framework to simplify the whole problem. According to the AD principles, a hierarchical structure has been developed. The developed structure originated in lean manufacturing principles and exis...
متن کاملDiffSharp: Automatic Differentiation Library
In this paper we introduce DiffSharp, an automatic differentiation (AD) library designed with machine learning in mind. AD is a family of techniques that evaluate derivatives at machine precision with only a small constant factor of overhead, by systematically applying the chain rule of calculus at the elementary operator level. DiffSharp aims to make an extensive array of AD techniques availab...
متن کاملADIC2: Development of a component source transformation system for differentiating C and C++
We present a new tool, ADIC2, for automatic differentiation (AD) of C and C++ code through source-to-source transformation. ADIC2 is the successor of the ADIC differentiation tool, which supports forward mode AD of C and a small subset of C++. ADIC2 was completely redesigned and reimplemented as part of the OpenAD software framework, resulting in a robust, flexible, and extensible tool for diff...
متن کاملEfficient Calculation of Sensitivities for Optimization Problems
Sensitivity information is required by numerous applications such as, for example, optimization algorithms, parameter estimations or real time control. Sensitivities can be computed with working accuracy using the forward mode of automatic differentiation (AD). ADOL-C is an AD-tool for programs written in C or C++. Originally, when applying ADOL-C, tapes for values, operations and locations are...
متن کاملDemystifying Differentiable Programming: Shift/Reset the Penultimate Backpropagator
class Num class NumV(val x: Double) extends Num class NumF(val x: Num, val d: Num, val tag: Int) extends Num {...} def grad(f: Num => Num)(x: Num): Num = {...} Alternative implementations using parameterized types and type classes instead of OO-style inheritance are also possible. This concludes the core ideas of forward-mode automated differentiation (AD). Forward-mode AD implementations using...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Higher-Order and Symbolic Computation
دوره 21 شماره
صفحات -
تاریخ انتشار 2008